import {getData as axios} from '@/axios/index.js'

export default {
  //更新菜单列表
  updatamenu(state, payload) {
    state.menuList = payload
  },
  //更新 角色
  updaterole(state, payload) {
    state.roleList = payload
  },
  //更新 管理员 列表
  updateuser(state, payload) {
    state.userList = payload
  },
  //更新 商品分类 列表
  updatecategory(state, payload) {
    state.categoryList = payload
  },
  //更新 商品规格 列表
  updatespecs(state, payload) {
    state.specsList = payload
  },
  //更新 商品 列表
  updatagoods(state, payload) {
    state.goodsList = payload
  },
  //跟新秒杀列表
  updateseck(state, payload) {
    state.seckList = payload
  },
  //跟新秒杀列表
  updatabanner(state, payload) {
    state.bannerList = payload
  },
  //跟新秒杀列表
  updatamember(state, payload) {
    state.memberList = payload
  },
  // //删除菜单
  // deleteItem(state, payload) {
  //   state.menuList.splice(payload, 1)
  // },
  //用户登陆信息设置
  userinfo(state, payload) {
    state.userInfo = payload
  },
  //设置用户的token值
  setToken(state, payload) {
    state.token = payload
  }
}
